import autofit from "autofit.js";

export default {
  mounted () {
    autofit.init({
      dh: 1080,
      dw: 1920,
      el: '#app',
      resize: true,
    }, false)
    this.init()
  },
  methods: {
    init () {
      let html = document.getElementsByTagName('html')[0]
      let oWidth = document.body.clientWidth || document.documentElement.clientWidth
      html.style.fontSize = oWidth / 1920 * 16 + 'px'
    }
  }
}
